package com.linjj.seckill.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * RabbitMQ配置文件
 * 新建秒杀队列
 * Direct模式
 * */
@Configuration
public class RabbitMQConfig {
    public static final String SECKILL_QUEUE = "seckill.queue";
    @Bean
    public Queue queue() {
        return new Queue(SECKILL_QUEUE, true);
    }
}
